package com.docx.knife4j.controller;

import com.docx.knife4j.response.MyResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "demo")
public class Knife4jDemoController {

  /**
   * http://localhost:8080/getUser
   * @return
   */
  @ApiOperation(value = "getUser", httpMethod = "GET") // 在这里添加注解
  @GetMapping(path = "/getUser")
  public MyResponse getUser() {
    return new MyResponse("zhangsan", "张三");
  }

}
